package fr.cpe.dp.projet2.model.musicPlayer;

import javax.sound.midi.InvalidMidiDataException;
import javax.sound.midi.Sequencer;

import fr.cpe.dp.projet2.model.music.IMusic;

public abstract class DecoratorMusicPlayer implements IMusicPlayer {

	private IMusicPlayer musicPlayer;
	
	public DecoratorMusicPlayer(IMusicPlayer musicPlayer) {
		this.musicPlayer = musicPlayer;
	}
	
	@Override
	public void play() throws InvalidMidiDataException {
		musicPlayer.play();
	}

	@Override
	public void pause() {
		musicPlayer.pause();
	}

	@Override
	public void stop() {
		musicPlayer.stop();
	}

	@Override
	public IMusic getMusic() {
		return musicPlayer.getMusic();
	}

	@Override
	public void setMusic(IMusic music) {
		musicPlayer.setMusic(music);
	}
	
	@Override
	public Sequencer getSequencer() {
		return musicPlayer.getSequencer();
	}

}
